package router

import (
	"database-platform/handler"
	"github.com/gin-gonic/gin"
)

func InitInstanceRoutes(e *gin.Engine) *gin.RouterGroup {
	instanceApi := e.Group("/api/v1/instances")

	instanceApi.GET("", handler.ListInstanceHandler)
	instanceApi.GET("/:id", handler.RetrieveInstanceHandler)
	instanceApi.POST("", handler.InsertInstanceHandler)
	instanceApi.PUT("/:id", handler.UpdateInstanceHandler)
	instanceApi.DELETE("/:id", handler.DeleteInstanceHandler)

	return instanceApi
}
